<?php

class PageRequest {
	
	public $pkPage, $method, $getVars, $postVars, $files, $request;
	
	public function __construct($pkPage, $method="index") {
		
		//CMS Request Parameters
		$this->pkPage = $pkPage;
		$this->method = $method;
		
		//Basic Request Stuff
		$this->request = $_REQUEST;
		$this->getVars = $_GET;
		$this->postVars = $_POST;
		$this->files = $_FILES;
	}
	
	public final function getPkPage() {
		return $this->pkPage;
	}
	
	public final function getMethod() {
		return $this->method;
	}
	
	public final function setMethod($value) {
		$this->method = $value;
	}
	
	public final function getRemoteIp() {
		return $_SERVER["REMOTE_ADDR"];
	}
	
	public final function getGetVar($name) {
		if(isset($this->getVars[$name]))
			return $this->getVars[$name];
			
	}
	
	public final function setGetVar($name, $value) {
		$this->getVars[$name] = $value;
	}
	
	public final function getPostVar($name) {
		if(isset($this->postVars[$name]))
			return $this->postVars[$name];
	}
	
	public final function getPostArray() {
		return $this->postVars;
	}	
	
	public final function getGetArray() {
		return $this->getVars;
	}
	
	public final function getFiles() {
		return $this->files;
	}
}


?>